package com.huaxinkaiye.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class ActivityTransformUtil {

	/**
	 * @param context
	 * @param clazz
	 * @param bundle
	 */
	public static <T extends Activity> void startActivityByclassType(
			Context context, Class<T> clazz, Bundle bundle) {
		Intent intent = new Intent();
		intent.setClass(context, clazz);
		if (bundle != null) {
			intent.putExtras(bundle);
		}
		context.startActivity(intent);
	}

	public static Bundle getData(Intent intent) {
		return intent.getExtras();
	}
}
